﻿using CRM.Admin.Contracts.Contract.Customer;
using CRM.Admin.Contracts.Model.Customer;
using KingsSharp.Core;
using KingsSharp.Core.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CRM.Admin.Services.Service.Customer
{
    /// <summary>
    /// 组织架构
    /// </summary>
    public class OrganizationalStructureService : ServiceBase, IOrganizationalStructureService
    {
        private IRepository<OrganizationalStructure, Guid> organizationalStructureRepository;
        public OrganizationalStructureService(IRepository<OrganizationalStructure, Guid> _organizationalStructureRepository) : base(_organizationalStructureRepository.UnitOfWork)
        {
            organizationalStructureRepository = _organizationalStructureRepository;
        }
        public IQueryable<OrganizationalStructure> OrganizationalStructures
        {
            get
            {
                return organizationalStructureRepository.Entities;
            }

        }
    }
}
